package com.panshi.service.impl;

import com.panshi.bean.Dynamic;
import com.panshi.bean.Message;
import com.panshi.bean.Paging;
import com.panshi.dao.IDynamicDao;
import com.panshi.service.IDynamicService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class DynamicServiceImpl implements IDynamicService {

    @Resource
    private IDynamicDao  dynamicDao;

    @Override
    public List<Dynamic> allQueryDynamic(int id) {
        List<Dynamic>dynamic =dynamicDao.allQueryDynamic(id);
        log.info("DynamicServiceImpl:个人动态数据={}",dynamic);
        return dynamic;
    }



    @Override
    public List<Message> allQueryMessage(/*Paging paging*/ int id) {
        List<Message> message =dynamicDao.allQueryMessage(id);
        log.info("DynamicServiceImpl:个人站内消息={}",id);
        return message;
    }
}
